<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<link href="../css/newmaincss.css" rel="stylesheet" type="text/css"
	media="all" />
<style type="text/css">
<!--
.STYLE10 {
	color: #990000
}
-->
</style>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>补丁管理 - ROAS资源管理系统</title>


</head>

<body margin=0>

	<table width="100%" bgcolor="#FFFFFF" border="0" cellpadding="0"
		cellspacing="0">
		<tr>
			<td height="28" class="STYLE7">系统管理 &gt;账号维护</td>
		</tr>
		<tr>
			<td valign="top"><table width="100%" align="center">
					<tr>
						<td height="20" colspan="2" bordercolor="#000000"
							bgcolor="#1C94C4"><div align="center" class="STYLE1">账号信息修改</div></td>
					</tr>
					<tr>
						<td height="25" bgcolor="#f5f5f5"><div align="right"
								class="STYLE6">
								<div align="left">&nbsp;用户名：</div>
							</div></td>
						<td height="25" bgcolor="#f5f5f5"><span class="STYLE6">
								<input id="username" type="text" disabled="disabled" /> </label>
						</span></td>
					</tr>
					<tr>
						<td height="25" bgcolor="#f5f5f5"><div align="right"
								class="STYLE6">
								<div align="left">&nbsp;密码：</div>
							</div></td>
						<td height="25" bgcolor="#f5f5f5"><input id="password"
							type="password" /></td>
					</tr>
					<tr>
						<td height="25" bgcolor="#f5f5f5"><div align="right"
								class="STYLE6">
								<div align="left">&nbsp;性别：</div>
							</div></td>
						<td height="25" bgcolor="#f5f5f5"><span class="STYLE6">
								<select id="sex">
									<option>男</option>
									<option>女</option>
							</select> </label>
						</span></td>
					</tr>
					<tr>
						<td height="25" bgcolor="#f5f5f5"><div align="right"
								class="STYLE6">
								<div align="left">&nbsp;用户角色：</div>
							</div></td>
						<td height="25" bgcolor="#f5f5f5"><select id="role">
								<option>管理员</option>
								<option>结算员</option>
								<option>报单员</option>
						</select></td>
					</tr>

					<tr>
						<td height="25" bgcolor="#f5f5f5"><div align="right"
								class="STYLE6">
								<div align="left">&nbsp;使用人姓名：</div>
							</div></td>
						<td height="25" bgcolor="#f5f5f5"><input id="realname"
							type="text" /></td>
					</tr>
					<tr>
						<td height="25" bgcolor="#f5f5f5"><div align="right"
								class="STYLE6">
								<div align="left">&nbsp;联系手机号：</div>
							</div></td>
						<td height="25" bgcolor="#f5f5f5"><input id="telephone"
							type="text" /></td>
					</tr>
					<tr>
						<td colspan="2" bgcolor="#1C94C4"><div align="center"
								class="STYLE6">
								<form action="" method="post" name="form1" id="form1">
									<label> <input type="button" name="Submit" value="修改"
										onclick="winalert()" />
									</label>
								</form>
							</div></td>
					</tr>
				</table></td>
		</tr>
	</table>
	<script type="text/javascript" src="../js/jquery-1.11.1.min.js"></script>
	<script language="javascript">
		var url = window.location + "";
		var username = url.substring(url.indexOf("?id=") + 4, url.length);
		$.get("../user/userinfo", {
			username : username
		}, function(json) {
			$("#username").prop("value", json.UserName);
			$("#password").prop("value", json.UserPwd);
			$("#userrole").prop("value", json.UserRole);
			$("#telephone").prop("value", json.Telephone);
			$("#realname").prop("value", json.RealName);
			$("#sex").prop("value", json.Sex);
		});
		function winalert() {
			$.post("../user/edit", {
				username : $("#username").val(),
				password : $("#password").val(),
				sex : $("#sex").val(),
				role : $("#role").val(),
				realname : $("#realname").val(),
				telphone : $("#telephone").val()
			}, function(json) {
				if(json)
					{
					alert("更新成功");
					window.returnValue="1";
					window.close();
					}
			});
		}
	</script>
</body>
</html>
